package it.giuseppetrisciuoglio.lyrics.persistence.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity
@Table(name = "TB_CACHE_RESPONSE")
public class CacheResponse extends CommonClass {

	@Id
	@Column(name="TXT_URL")
	private String url;
	
	@Column(name="TS_CREATION_DATE")
	private Date creationDate;
	
	@Lob
	@Column(name="TXT_PAYLOAD")
	private String payload;
	@Column(name="NUM_STATUS")
	private int statusResponse;
	
	@Version
	@Column(name="NUM_VERSION")
	private Long version;
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Date getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}
	public String getPayload() {
		return payload;
	}
	public void setPayload(String payload) {
		this.payload = payload;
	}
	public int getStatusResponse() {
		return statusResponse;
	}
	public void setStatusResponse(int statusResponse) {
		this.statusResponse = statusResponse;
	}
	public Long getVersion() {
		return version;
	}
	public void setVersion(Long version) {
		this.version = version;
	}
	
}
